package com.xbongbong.pro.domain.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author 吴峰
 * @date 2021/03/03 14:22
 */
@Setter
@Getter
@ToString
public class LowCodeServiceInfoEntity implements Serializable {


    private static final long serialVersionUID = 192846980958357575L;
    private Long id;

    private String corpid;

    /**
     * @see com.xbongbong.pro.enums.lowcode.ServiceTypeEnum
     */
    private Integer type;
    /**
     * 1: 后端注册服务；2：前端注册服务
     * @see com.xbongbong.pro.enums.lowcode.ServiceRegisterTypeEnum
     */
    private Integer serviceType;

    /**
     * 名称
     */
    private String name;

    /**
     * 0:私有；1：平台服务
     */
    private Integer platFormService;

    /**
     * 管理人员
     */
    private String administrator;

    /**
     * 使用人员
     */
    private String user;

    /**
     * GET/POST请求
     */
    private String requestMethod;

    /**
     * 请求头
     */
    private String requestHeader;

    /**
     * 是否由服务器代理发起请求
     */
    private Integer proxyRequest;

    private String url;

    private Integer signatureFlag;

    private String signature;

    private Integer hmacSecretFlag;

    private String hmacSecret;

    /**
     * 参数列表 [{"parameter":"val","label":{"zh_CN":"值","en_US":"value"}}]
     */
    private String param;

    private String memo;

    private String creatorId;

    private Long addTime;

    private Long updateTime;

    private Integer del;

    public LowCodeServiceInfoEntity() {
    }

    public LowCodeServiceInfoEntity(String corpid, Integer type, Integer serviceType, String name, Integer platFormService, String administrator, String requestMethod, String requestHeader, Integer proxyRequest, String user, String url, Integer signatureFlag,
                                    String signature, Integer hmacSecretFlag, String hmacSecret, String param, String memo, String creatorId) {
        this.corpid = corpid;
        this.type = type;
        this.serviceType = serviceType;
        this.name = name;
        this.platFormService = platFormService;
        this.administrator = administrator;
        this.requestMethod = requestMethod;
        this.requestHeader = requestHeader;
        this.proxyRequest = proxyRequest;
        this.user = user;
        this.url = url;
        this.signatureFlag = signatureFlag;
        this.signature = signature;
        this.hmacSecretFlag = hmacSecretFlag;
        this.hmacSecret = hmacSecret;
        this.param = param;
        this.memo = memo;
        this.creatorId = creatorId;
    }


    public LowCodeServiceInfoEntity(Integer type, String name, Integer platFormService, String administrator, String requestMethod, String requestHeader, Integer proxyRequest, String user, String url,
                                    Integer signatureFlag, String signature, Integer hmacSecretFlag, String hmacSecret, String param, String memo) {
        this.type = type;
        this.name = name;
        this.platFormService = platFormService;
        this.administrator = administrator;
        this.requestMethod = requestMethod;
        this.requestHeader = requestHeader;
        this.proxyRequest = proxyRequest;
        this.user = user;
        this.url = url;
        this.signatureFlag = signatureFlag;
        this.signature = signature;
        this.hmacSecretFlag = hmacSecretFlag;
        this.hmacSecret = hmacSecret;
        this.param = param;
        this.memo = memo;
    }
}
